export const replacePropValues = (arr) => {
  return arr.map(item => {
    if (item.status === 1) {
      return { ...item, status: '启用' };
    } else if (item.status === 0) {
      return { ...item, status: '禁用' };
    }
    return item;
  });
};
export const formatDateArray = (arr) => {
  return arr.map(item => {
    const date = new Date(item.create_time);
    const year = date.getFullYear();
    const month = date.getMonth() + 1;
    const day = date.getDate();
    const hours = date.getHours();
    const minutes = date.getMinutes();
    const seconds = date.getSeconds();

    const formattedDate = `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;

    return { ...item, create_time: formattedDate };
  });
}
